﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ManagerGame
{
    /// <summary>
    /// Class detailing a branch of business that contains individual companies.
    /// </summary>
    [Serializable]
    public class Business
    {
        /// <summary>
        /// this is needed for serializing
        /// </summary>
        public Business() { }

        /// <summary>
        /// Type of the business
        /// </summary>
        public BusinessType CompanyType { get; set; }

        private List<Company> _companies;

        /// <summary>
        /// Companies owned
        /// </summary>
        public List<Company> Companies
        {
            get
            {
                if (this._companies == null)
                {
                    this._companies = new List<Company>();
                }
                return _companies;
            }
            set
            {
                this._companies = value;
            }
                
        }

        /// <summary>
        /// Total risk value of the business
        /// </summary>
        public double TotalRisk { get; set; }

        /// <summary>
        /// Total income of the business
        /// </summary>
        public double TotalIncome { get; set; }

    }
}
